printf("%02x ", buf[i] & 0xFF);
for (i = 0; i < sz; i++) {
char c = buf[i];
- if isspace(c) c = ' ';
+ if (isspace(c)) c = ' ';
else if (! isprint(c)) c = '.';
printf("%c", c);
}
exif_tag_t *tag = (exif_tag_t *)elem;
if ((tag->size > 4) && (tag->value)) {
gbuint16 i;
- void *ptr;
+ char *ptr;
tag->data = xmalloc(tag->size);
tag->data_is_dynamic = 1;
- ptr = (void *)tag->data;
+ ptr = tag->data;
gbfseek(fin, tag->value, SEEK_SET);
if (BYTE_TYPE(tag->type)) gbfread(ptr, tag->count, 1, fin);
if (tag && (tag->size > 8)) {
char *str = NULL;
if (memcmp(tag->data, "ASCII\0\0\0", 8) == 0) {
- str = xstrndup(tag->data + 8, tag->size - 8);
+ str = xstrndup((char *)tag->data + 8, tag->size - 8);
}
else if (memcmp(tag->data, "UNICODE\0", 8) == 0) {
int i, len = (tag->size - 8) / 2;
- gbint16 *s = tag->data + 8;
+ gbint16 *s = (void *)((char *)tag->data + 8);
for (i = 0; i < len; i++) s[i] = be_read16(&s[i]); /* always BE ? */
str = cet_str_uni_to_any(s, len, global_opts.charset);
}
{
if (tag->size > 4) gbfputuint32(tag->value, fout); /* offset to data */
else {
- void *data = tag->data;
+ char *data = tag->data;
if BYTE_TYPE(tag->type) gbfwrite(data, 4, 1, fout);
else if WORD_TYPE(tag->type) {
if (tag->size > 4) {
gbuint16 i;
- void *ptr = tag->data;
+ char *ptr = tag->data;
if BYTE_TYPE(tag->type) gbfwrite(tag->data, tag->size, 1, fout);
else for (i = 0; i < tag->count; i++) {
static void
exif_write(void)
{
- exif_wpt_ref = NULL;
char alt_ref = 0;
time_t frame;
+ exif_wpt_ref = NULL;
+
if (opt_name) {
waypt_disp_all(exif_find_wpt_by_name);
if (exif_wpt_ref == NULL) route_disp_all(NULL, NULL, exif_find_wpt_by_name);